package de.baumann.browser.api.net

import de.baumann.browser.BuildConfig
import de.baumann.browser.api.net.base.BaseUrl
import de.baumann.browser.api.net.vo.HashValue
import de.baumann.browser.api.net.vo.MiningIncome
import de.baumann.browser.api.net.vo.OcTransfer
import de.baumann.browser.api.net.vo.Result
import io.reactivex.Observable
import org.bouncycastle.LICENSE
import retrofit2.http.Field
import retrofit2.http.FormUrlEncoded
import retrofit2.http.POST

@BaseUrl(BuildConfig.WALLET_API_URL)
interface WalletApiService {

    @FormUrlEncoded
    @POST("user/transRecord")
    fun getTransferRecord(@Field("address") address: String,
                          @Field("type") type: String,
                          @Field("page") page: Int,
                          @Field("pageSize") pageSize: Int = 20

    ): Observable<Result<List<OcTransfer>>>


    @FormUrlEncoded
    @POST("user/powerRecord")
    fun getPowerRecord(@Field("address") address: String): Observable<Result<List<HashValue>>>

    @FormUrlEncoded
    @POST("mine/detail")
    fun getMinigIncome(@Field("address") address: String): Observable<Result<List<MiningIncome>>>

}